<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/javascript/my.js"></script>
    
</head>
<body onpageshow="resetPagination('dg')">
    {datagrid id="dg" datasource="/flow/NodeService/findByFlowDefinitionId.do?flow_def_id=`$Request.flow_def_id`" view="f_node" }
    {form id="dlg" view="f_node" }
    <script>
    var flow_def_id={$Request.flow_def_id};
    {literal}
    field_formatters.node_type=function (value, row, index){
    	if(value == 0) {
    		return "开始节点";
    	} else if(value == 9) {
    		return "结束节点";
    	} else {
    		return "普通节点";
    	}
    }
    field_formatters.participant_type=function (value, row, index){
    	if(value == 'role') {
    		return "角色";
    	} else {
    		return value;
    	}
    }
    field_formatters.finish_condition=function (value, row, index){
    	if(value == 3) {
    		return "所有完成";
    	} else if(value == 2) {
    		return "多数完成";
    	} else if(value == 1) {
    		return "一个完成";
    	} else {
    		return "无需完成";
    	}
    }
    field_formatters.task_mode=function (value, row, index){
    	if(value == 4) {
    		return "继承前一节点的参与者";
    	} else if(value == 3) {
    		return "参与者抢占";
    	} else if(value == 2) {
    		return "指定多个参与者";
    	} else {
    		return "一个任务一个参与者";
    	}
    }
    field_formatters.route_mode=function (value, row, index){
    	if(value == 1) {
    		return "人工路由";
    	} else {
    		return "自动路由";
    	}
    }
    field_formatters.allow_split=function (value, row, index){
    	if(value == 1) {
    		return "允许";
    	} else {
    		return "不允许";
    	}
    }
    field_formatters.task_start_type=function (value, row, index){
    	if(value == 1) {
    		return "自动启动";
    	} else {
    		return "手动启动";
    	}
    }
    field_formatters.emergency_level=function (value, row, index){
    	if(value == 3) {
    		return "<font color='red'>紧急</font>";
    	} else if(value == 2) {
    		return "中等";
    	} else {
    		return "一般";
    	}
    }
    field_formatters.priority_level=function (value, row, index){
    	if(value == 3) {
    		return "<font color='red'>高</font>";
    	} else if(value == 2) {
    		return "中";
    	} else {
    		return "低";
    	}
    }
    action_prehandlers.createOne=function(){
    	return {"flow_def_id":flow_def_id}
    }
    {/literal}
    </script>
</body>
</html>